package com.fessc.develop.entity.ccbvo;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fessc.develop.utils.BusiUtil;
import com.fessc.develop.utils.DateUtil;
import lombok.Data;
import org.springframework.stereotype.Service;

import java.time.LocalDateTime;

/**
 * 建行推送请求报文head
 */

@Data
@Service
public class CCBCommonSendHeadVo {
    @JsonProperty("MsgBsnTp")
    String MsgBsnTp; //报文业务类型

    @JsonProperty("Org")
    String Org; //机构代码

    @JsonProperty("CoPlfID")
    String CoPlfID; //交易平台码

    @JsonProperty("ReqTime")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    LocalDateTime ReqTime; //请求时间

    @JsonProperty("ReqTraceId")
    String ReqTraceId; //发送流水号

    public CCBCommonSendHeadVo() {
        this.ReqTraceId = BusiUtil.getSerialNumber("HMT", "", 5);  //流水号
        this.ReqTime = DateUtil.getCurrentLocalDateTime();  //请求时间
    }
}
